<template>
  <div class="card bg-white p-3 mt-3">
    <div class="card-header d-flex ai-center pb-3">
      <i class="iconfont" :class="`icon-${icon}`"></i>
      <div class="fs-xl flex-1 px-2">{{title}}</div>
      <i class="iconfont icon-dot" v-if="!plain"></i>
    </div>
    <div v-if="imgurl" class="w-100"><img class="w-100" :src="imgurl" alt=""></div>
    <div class="card-body pt-3">
      <slot></slot>
    </div>
  </div>
</template>

<script>
export default {
  props:{
    title:{type:String,required:true},
    icon:{type:String,required:true},
    plain:{type:Boolean},
    imgurl:{type:String}
  }
};
</script>

<style lang="scss" scoped>
@import '../assets/scss/variables';
.card{
  border-bottom: 1px solid $border-color;
  .card-header{
    border-bottom: 1px solid $border-color;
  }
}
</style>